How to structure a function to add a key-value pair to a javascript object

visit shbcf.ru